package integration

import org.junit.jupiter.api.extension.ExtendWith
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.context.annotation.ComponentScan
import org.springframework.test.context.ActiveProfiles
import org.springframework.test.context.junit.jupiter.SpringExtension


/**
 * Created by udi on 17-3-27.
 */

@ExtendWith(SpringExtension::class)
@SpringBootTest()
@SpringBootApplication
@ComponentScan(basePackages = arrayOf("nancal.mp", "nancal.mp"))
@ActiveProfiles("yuxh","k8s")
class TestBase {


    /*  init {
          GenericXmlApplicationContext().environment.setActiveProfiles("test")
          //ParserConfig.getGlobalInstance().putDeserializer(ObjectId::class.java, ObjectIdDeserializer())
      }*/

    init {
//        GenericXmlApplicationContext().environment.setActiveProfiles("cuiyong")
        System.setProperty("app.upload.host", "dev8.cn:9503");
        System.setProperty("app.scheduler", "false");
        System.setProperty("app.group","yuxh")
        System.setProperty("server.db","mp")

        System.setProperty("jdk.tls.client.protocols", "TLSv1.2");
//        System.setProperty("server.scheduler","false")
//        System.setProperty("server.score-url","/")
        //ParserConfig.getGlobalInstance().putDeserializer(ObjectId::class.java, ObjectIdDeserializer())
    }
}